import request from '@/utils/request'

// 一级列表
export function getListDataApi(data) {
  return request({
    url: '/dict/query/',
    method: 'get',
    params: data
  })
}
// 新增
export function addDictApi(data) {
  return request({
    url: '/dict/add',
    method: 'post',
    data: data
  })
}
// 编辑
export function editDictApi(data) {
  return request({
    url: '/dict/edit',
    method: 'post',
    data: data
  })
}
// 删除
export function delDictApi(data) {
  return request({
    url: '/dict/delete/' + data.id,
    method: 'post',
    data: data
  })
}
// 二级列表
export function getTwoListDataApi(data) {
  return request({
    url: '/dict_item/query/',
    method: 'get',
    params: data
  })
}
// 新增
export function addTwoDictApi(data) {
  return request({
    url: '/dict_item/add',
    method: 'post',
    data: data
  })
}
// 编辑
export function editTwoDictApi(data) {
  return request({
    url: '/dict_item/edit',
    method: 'post',
    data: data
  })
}
// 删除
export function delTwoDictApi(data) {
  return request({
    url: '/dict_item/delete/' + data.id,
    method: 'post',
    data: data
  })
}